using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools
{
    /// <summary>
    /// <para>Generate Intersections</para>
    /// <para>Generates new intersections and updates existing intersections.</para>
    /// <para>生成新交叉点并更新现有交叉点。</para>
    /// </summary>    
    [DisplayName("Generate Intersections")]
    public class GenerateIntersections : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateIntersections()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_intersection_feature_class">
        /// <para>Intersection Feature Class</para>
        /// <para>The input LRS intersection feature class or layer.</para>
        /// <para>输入 LRS 相交要素类或图层。</para>
        /// </param>
        public GenerateIntersections(object _in_intersection_feature_class)
        {
            this._in_intersection_feature_class = _in_intersection_feature_class;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Generate Intersections";

        public override string CallName => "locref.GenerateIntersections";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_intersection_feature_class, _in_network_layer, _start_date, _edited_by_current_user.GetGPValue(), _out_intersection_feature_class, _out_details_file];

        /// <summary>
        /// <para>Intersection Feature Class</para>
        /// <para>The input LRS intersection feature class or layer.</para>
        /// <para>输入 LRS 相交要素类或图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Intersection Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_intersection_feature_class { get; set; }


        /// <summary>
        /// <para>Network Layer</para>
        /// <para>The input LRS Network feature class or layer.</para>
        /// <para>输入 LRS 网络要素类或图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_network_layer { get; set; } = null;


        /// <summary>
        /// <para>Start Date</para>
        /// <para>Filters routes that have been edited after a certain date so that intersections can be generated.</para>
        /// <para>过滤在特定日期之后编辑的路径，以便可以生成交叉点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Start Date")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _start_date { get; set; } = null;


        /// <summary>
        /// <para>Only use routes edited by current user</para>
        /// <para><xdoc>
        ///   <para>Specifies whether intersections will be generated only for routes edited and locked by the current user.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Intersections will be generated only for routes edited by the current user. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Intersections will be generated for all edited routes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否仅为当前用户编辑和锁定的路径生成交叉点。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 仅针对当前用户编辑的路径生成交叉点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—将为所有编辑的路径生成交点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Only use routes edited by current user")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _edited_by_current_user_value _edited_by_current_user { get; set; } = _edited_by_current_user_value._true;

        public enum _edited_by_current_user_value
        {
            /// <summary>
            /// <para>CURRENT_USER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CURRENT_USER")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ALL_USERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALL_USERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Intersection Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Intersection Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_intersection_feature_class { get; set; }


        /// <summary>
        /// <para>Output Details File</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Details File")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_details_file { get; set; }


        public GenerateIntersections SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}